import request from '@/core/interceptors'

// 获取user列表
export const getUserList = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user_list",
        method: "get",
        data
    });
};

// 获取role列表
export const getRoleList = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/role_list",
        method: "get",
        data
    });
};

export const updateUserAdmin = (data) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + "/user_update",
        method: "patch",
        data
    });
};

export const deleteUser = (id) => {
    return request({
        url: import.meta.env.VITE_USER_PATH + `/?id=${id}`,
        method: "delete",
    });
};